// SaveDialog.cpp : implementation file
//

#include "stdafx.h"
#include "InfoHide.h"
#include "SaveDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// SaveDialog dialog


SaveDialog::SaveDialog(CWnd* pParent /*=NULL*/)
	: CDialog(SaveDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(SaveDialog)
	m_saveinfo = _T("");
	//}}AFX_DATA_INIT
}


void SaveDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SaveDialog)
	DDX_Text(pDX, IDC_SaveInfo, m_saveinfo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(SaveDialog, CDialog)
	//{{AFX_MSG_MAP(SaveDialog)
	ON_BN_CLICKED(IDC_TextSave, OnTextSave)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// SaveDialog message handlers

void SaveDialog::OnTextSave() 
{
	// TODO: Add your control notification handler code here
	static char szFilter[] = "All Files(*.*)|*.*||";
	CFileDialog dlg(FALSE , NULL, NULL,
		OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter );
	if (IDOK == dlg.DoModal())
	{
		m_saveinfo=dlg.GetPathName();
	}
	SetDlgItemText(IDC_SaveInfo,m_saveinfo);
}
